package app.ui;

import org.apache.http.message.BasicNameValuePair;

import android.os.Parcel;
import android.os.Parcelable;

public class NewDealData implements Parcelable {
	private int startHour, startMin, endHour, endMin, rate, day, money;
	private String type, name, comment ;
	
	public int getStartHour() {
		return startHour;
	}
	
	public int getMoney() {
		return money;
	}

	public void setMoney(int money) {
		this.money = money;
	}

	public void setStartHour(int startHour) {
		this.startHour = startHour;
	}

	public int getStartMin() {
		return startMin;
	}

	public void setStartMin(int startMin) {
		this.startMin = startMin;
	}

	public int getEndHour() {
		return endHour;
	}

	public void setEndHour(int endHour) {
		this.endHour = endHour;
	}

	public int getEndMin() {
		return endMin;
	}

	public void setEndMin(int endMin) {
		this.endMin = endMin;
	}

	public int getRate() {
		return rate;
	}

	public void setRate(int rate) {
		this.rate = rate;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public int getDay() {
		return day;
	}

	public void setDay(int day) {
		this.day = day;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public NewDealData (int sHour, int sMin, int eHour, int eMin, String type, int day, String name, int rate, int money,  String comment){
		this.startHour = sHour;
		this.startMin = sMin;
		this.endHour = eHour;
		this.endMin = eMin;
		this.type = type;
		this.day = day;
		this.name = name;		
		this.rate = rate;
		this.money = money;
		this.comment = comment;
	}
	
	public NewDealData(Parcel in){
		readFromParcel(in);
	}
	
	
	
	
	private void readFromParcel(Parcel in) {
		startHour = in.readInt();
		startMin = in.readInt();
		endHour = in.readInt();
		endMin = in.readInt();
		type = in.readString();
		day = in.readInt();
		name = in.readString();
		rate = in.readInt();
		money = in.readInt();
		comment = in.readString();
		
	}

	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(startHour);
		dest.writeInt(startMin);
		dest.writeInt(endHour);
		dest.writeInt(endMin);
		dest.writeString(type);
		dest.writeInt(day);
		dest.writeString(name);
		dest.writeInt(rate);
		dest.writeInt(money);
		dest.writeString(comment);
	}
	


	public static final Parcelable.Creator CREATOR =
	    	new Parcelable.Creator() {
	            public NewDealData createFromParcel(Parcel in) {
	                return new NewDealData(in);
	            }
	 
	            public NewDealData[] newArray(int size) {
	                return new NewDealData[size];
	            }
	        };

}
